package com.icoopoo.ibase.base;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public abstract class BaseServiceImpl<T extends BaseModel,D extends BaseDao<T>> implements BaseService<T,D>{

	@Autowired
	private D dao;
	
	@Override
	public int saveModel(T t) {
		
		return dao.saveModel(t);
	}

	@Override
	public int updateModel(T t) {
		return dao.updateModel(t);
	}

	@Override
	public int deleteModelByIds(List<String> ids) {
		return dao.deleteModelByIds(ids);
	}

	@Override
	public int deleteModelById(String id) {
		return dao.deleteModelById(id);
	}

	@Override
	public T getModelById(String id) {
		return dao.getModelById(id);
	}

	@Override
	public List<T> fingModels() {
		return dao.fingModels();
	}

}
